﻿@{
    Layout = "_AuthorLayout";
    ViewData["Title"] = "稿费查询";
    var author = Model;
    ViewData["Name"] = author[0].AuthorName;
;
}

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-title">
                    <h4>稿费明细 </h4>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>书名</th>
                                    <th>当前状态</th>
                                    <th>出版日期</th>
                                    <th>单价</th>
                                    <th>当前销售数量</th>
                                    <th>已获稿费</th>
                                </tr>
                            </thead>
                            <tbody>
                                @if(author[0].Num==null){

                                }
                                else{ 
                                    for(int i = 0; i < author.Count-1; i++)
                                    {
                                        <tr>
                                            <th scope="row">@author[i].Num</th>
                                            <td>@author[i].Name</td>
                                            @if (author[i].Statu == "等待续签合同")
                                            {
                                                <td><span class="badge badge-primary">@author[i].Statu</span></td>
                                            }
                                            @if (author[i].Statu == "热销中")
                                            {
                                                <td><span class="badge badge-success">@author[i].Statu</span></td>
                                            }
                                            @if (author[i].Statu == "备货中")
                                            {
                                                <td><span class="badge badge-danger">@author[i].Statu</span></td>
                                            }
                                            
                                            <td>@author[i].PublishDate</td>
                                            <td>@author[i].Price</td>
                                            <td>@author[i].CountSale</td>
                                            <td>@author[i].Fee</td>
                                        </tr>

                                    }
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>